<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Kalamazoo Animal Rescue</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<?php include("head.inc");  ?>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<!--initial body width and height set up  -->
<div id="bodywidth">

<?php include("header.inc");  ?>
<?php include("leftmenu.inc");  ?>

<!-- place center column content below -->

<div id="centercontent" style="width: 475px; height: auto">
<h3>Volunteer Corner</h3>
<p><a href="dogfoster/dog.html">Dog Fosters Crate</a></p>
<p><a href="catfoster/cat.html">Kitty Cat Connection</a></p>
<p><a href="general/general.html">General Volunteer Info</a></p>
<p><a href="events/events.html">Events</a></p>
<p><a href="rsn/rsn.html">Reports/Statistics/Newsletters</a></p>
<p><a href="filecab/filecab.html">File Cabinet</a></p>

    <HR class="thickline"/>
    <h2 class="style9">Upcoming Events</h2>

<?php

include("../db.php");
				// Connect to the database server
dbConnect('kar_web1');   	// Use function in db.php to connect

$result = @mysql_query("SELECT *
						FROM events 
						WHERE eventDate >= current_date AND eventDate < ADDDATE( current_date, 7 )
						ORDER BY eventDate") or
			die("Error getting events. ".mysql_error());

echo("&nbsp;<TABLE cellpadding=0 cellspacing=0>");

$num_rows = mysql_num_rows($result);
            
while ( $row = mysql_fetch_array($result) ) {
	$eventLoc = $row["eventLocation"];
	$ID = $row["eventID"];

	$BTime =  $row["eventBeginTime"];
	list($Bhour, $Bmin, $Bsec) = explode(":", $BTime);
	$BeginTime = date("ga", mktime($Bhour, $Bmin));
	
    $ETime =  $row["eventEndTime"];
	list($Ehour, $Emin, $Esec) = explode(":", $ETime);
	$EndTime = date("ga", mktime($Ehour, $Emin));
	
    $event = $row["eventID"];
	list($year, $month, $day)  = explode("-", $row["eventDate"]);
    $eventDate = date("F jS", mktime(0,0,0,$month, $day,$year));
    
    $query = "SELECT * FROM eventLocations WHERE EventLocationID = ".$eventLoc;
    $locationInfo = mysql_fetch_array(@mysql_query($query));
    $URL = $locationInfo["MapURL"];
    $eventName = $locationInfo["Title"];
    $friendlyLoc = $locationInfo["Address2"];
    
	echo("<TR><TD><h4>");
	if ($friendlyLoc != "")
    	echo($eventName." on ".$friendlyLoc." <a href=".$URL.">Map</a></h4></TD></TR>" );
    else
    	echo($eventName." <a href=".$URL.">Map</a></h4></TD></TR>" );

    echo("<TR><TD><h4>".$eventDate." (". $BeginTime . "-" . $EndTime.") <a href=\"#\">See the scheduled pets</a></h4></TD></TR><TR><TD>&nbsp;</TD></TR>");
}
echo("</TABLE>");
?>
    <h4>For more events click <a href="#">here</a></h4>
    <p align="center">&nbsp;</p>
    <hr class="thickline"/>
</div>
<!-- place right column content below -->

<div id="rightcolumn">

<div class="blue_background">

<h1 align="center">Pets of the Month<br />
</h1>

	<h1 align="center"><a href="#">Layla</a></h1>
	<p align="center"><a href="#"><img src="./images/scratch/3962-1-main.jpg" width="217" height="135" border="0" /></a><br />
    </p>
	<br />
    <h1 align="center"><a href="#">Cinnamon</a></h1>
    <p align="center"><a href="#"><img src="./images/scratch/3424-1-main.jpg" width="209" border="0" height="157" /></a><br />
    </p>
    <h1 align="center" class="style9">&nbsp;</h1>
    <h1 align="center" class="style9">KAR Placed</h1>
    <p align="center" class="style9">274 Dogs and</p>
    <p align="center" class="style9">444 Cats into </p>
    <p align="center" class="style9">Permanent Homes </p>
    <p align="center" class="style9">in 2008</p>
    <p align="center" class="style9">&nbsp;</p>
    <h1 align="center" class="style9">Kalamazoo County </h1>
    <h1 align="center" class="style9">needs a New</h1>
    <h1 align="center" class="style9"><a href="#">Animal Shelter</a></h1>
    <p align="center"><a href="#"><img src="./images/dogFace1.jpg" width="109" height="94" border="0" align="middle"/></a>
    </p>
    <p align="left">&nbsp;</p>
    <p style="text-align: center"><br />
 </p>
	</div>
<!--end blue background div-->

</div>

<? include("footer.inc");  ?>
<!--tag below ends bodywidth div -->


</div>
</body>
</html>